﻿CREATE Procedure [dbo].[GetUserShapeDimensions]
As
Begin

	select 
		u.[Id]
		,s.[Name] as ShapeName
		,s.[Description] as ShapeDescription
		,s.[Thumbnail] as ShapeThumbnail
		,s.[ImagePath] as ShapeImagePath
		,usd.[Side]
		,st.[Name] as SideTypeName
		,st.[Description] as SideTypeDescription
		,st.[ImagePath] as SideTypeImagePath
		,usd.[Measurement]
		,usd.[IsBackSplash]
	from dbo.[User] as u
	inner join dbo.UserShapeDimension as usd on u.[Id] = usd.[UserId]
	inner join dbo.Shape as s on s.[Id] = usd.[ShapeId]
	inner join dbo.SideType as st on st.[SideTypeId] = usd.[SideTypeId]
	where 
		u.[IsActive] = 1
		and s.[IsActive] = 1
		and st.[IsActive] = 1

End